﻿using QueryBuilder.Core.Query.Type;

namespace QueryBuilder.Core.Query.Presenters.Mysql
{
    /// <summary>
    /// 
    /// </summary>
    public class MysqlTypeMappingRegistry : TypeMappingsRegistry
    {
        /// <summary>
        /// Registers the type mappings.
        /// </summary>
        protected override void RegisterTypeMappings()
        {
            ITypeMapping boolTypeMapping = new BooleanType();
            this.RegisterTypeMapping(boolTypeMapping, "bool");

            ITypeMapping stringTypeMapping = new StringType();
            this.RegisterTypeMapping(stringTypeMapping, "String");

            ITypeMapping intTypeMapping = new Int32Type();
            this.RegisterTypeMapping(intTypeMapping, "Int32");

            ITypeMapping collationTypeMapping = new EnumStringType(typeof (CollationType));
            this.RegisterTypeMapping(collationTypeMapping, "CollationType");

            ITypeMapping dataTypeTypeMapping = new EnumStringType(typeof (DataType));
            this.RegisterTypeMapping(dataTypeTypeMapping, "DataType");

            ITypeMapping doubleMapping = new DoubleType();
            this.RegisterTypeMapping(doubleMapping, "Double");
        }
    }
}